<template>
  <!-- 联系技术 弹出框 -->
  <el-dialog
    class="pick-dialog"
    title="联系技术"
    :visible.sync="dialogVisible"
    :close-on-click-modal="false"
    append-to-body
    width="660px"
  >
    <div class="info-box">
      <el-descriptions border title="技术人员信息" v-if="ruleForm">
          <el-descriptions-item label="虞都负责人">{{ruleForm.serviceContact}} <el-button @click="copy(ruleForm.serviceContact)" type="primary" size="mini">复制</el-button></el-descriptions-item>
          <el-descriptions-item :label="ruleForm.name+'负责人'">{{ruleForm.contact}} <el-button @click="copy(ruleForm.contact)" type="primary" size="mini">复制</el-button></el-descriptions-item>
      </el-descriptions>
      <div style="height:20px"></div>
      <el-descriptions border title="获取KEY流程">
          <el-descriptions-item >
            <div>
              <p>
                1，请优先联系需开通接口的平台负责人（{{ruleForm.name}}负责人）获取平台密钥KYE
              </p>
              <p>
                2，将获取的密钥KEY发送给虞都接口负责人，进行调配，配置需要一定时间，切勿着急。
              </p>
              <p>
                3，配置好的接口可在“渠道接口列表”查看，推送日志信息也可在“渠道接口列表”查看
              </p>
            </div>
          </el-descriptions-item>
      </el-descriptions>
      
      <div class="center">
        <el-button
          type="primary"
          @click="close('ruleForm')"
          >我知道了</el-button
        >
      </div>
    </div>
  </el-dialog>
</template>

<script>
import interfaceChannelApi from "@/api/shanghuduan/interfaceChannel"
export default {
  name: "",
  components:{},
  data() {
    return {
      dialogVisible: false,
      loading: false,
      ruleForm: '',
    };
  },
  created() {
    
  },
  methods: {
    open(id) {
      this.loading = false;
      this.getInfoById(id)
      this.dialogVisible = true;
    },
    // 获取渠道信息
    getInfoById(id){
      interfaceChannelApi.getInfoById(id).then(res=>{
        //console.log("%c Line:80 🍰 res", "color:#b03734", res);
        this.ruleForm = res.data
      })
    },
    // 复制
    copy(txt){
      this.$copyText(txt).then(() => {
        this.$message.success("已复制到剪切板");
      });
    },
    close(formName) {
      this.$emit('close')
      this.dialogVisible = false;
    },
  },
};
</script>
<style scoped lang="scss">
.center{
  text-align: center;
  margin-top: 15px;
}
</style>
